<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>众创数字资产综合运营管理平台</title>
    <link rel="stylesheet" href="layui/css/layui.css"/>
    <link rel="stylesheet" href="css/admin.css"/>
</head>
<body>
	<div class="container">
		<div class="tar mt10">
			<button class="layui-btn layui-btn-normal layui-btn-small add">+添加</button>
			<button class="layui-btn layui-btn-danger layui-btn-small a4">删除</button>
		</div>

		<div class="table-list layui-form">
			<table class="layui-table" lay-skin="line">
			  <thead>
			    <tr>
			      <th width="30"><input type="checkbox" class="my-checkbox" ></th>
			      <th>用户账号</th>
			      <th>用户姓名</th>
			      <th>手机号码</th>
			      <th>账号权限</th>
			      <th>账号状态</th>
			      <th>添加时间</th>
			      <th>操作</th>
			    </tr> 
			  </thead>
			  <tbody>
			    <tr>
			      <td><input type="checkbox" class="my-checkbox" ></td>
			      <td>weber</td>
			      <td>小官</td>
			      <td>13728936116</td>
			      <td>账号管理、运营管理、订单管理</td>
			      <td><input type="checkbox" name="switch" checked lay-skin="switch" lay-text="启用|冻结"></td>
			      <td>2017-05-20</td>
			      <td><button class="layui-btn layui-btn-warm layui-btn-small add">编辑</button></td>
			    </tr>
			    <tr>
			      <td><input type="checkbox" class="my-checkbox" ></td>
			      <td>weber</td>
			      <td>小明</td>
			      <td>13728936116</td>
			      <td>账号管理、运营管理、订单管理</td>
			      <td><input type="checkbox" name="switch" lay-skin="switch" lay-text="启用|冻结"></td>
			      <td>2017-05-20</td>
			      <td><button class="layui-btn layui-btn-warm layui-btn-small add">编辑</button></td>
			    </tr>
			    
			  </tbody>
			</table>   
		</div>
	</div>
	<div id="table-pages" style="text-align:center"></div>
	<script type="text/javascript" src="layui/layui.js"></script>
    <script>
		layui.use(['jquery', 'laydate','form','layer','laypage'], function(){
			var $ = layui.jquery,
			    laydate = layui.laydate,
			    layer = layui.layer,
			    laypage = layui.laypage;


			// 分页
			 laypage({
			    cont: 'table-pages'
			    ,pages: 2
			    ,skip: true
			  });

            // 开始时间及截止时间
            var start = {
			   choose: function(datas){
			      end.min = datas; //开始日选好后，重置结束日的最小日期
			      end.start = datas //将结束日的初始值设定为开始日
			    }
			  };
			  
			  var end = {
			    choose: function(datas){
			      start.max = datas; //结束日选好后，重置开始日的最大日期
			    }
			  };

			$('#start').click(function(){
				start.elem = this;
    			laydate(start);
			});

			$('#end').click(function(){
				end.elem = this
    			laydate(end);
			});

			// 添加账户
			$(document).on("click", ".add", function() {
			    layer.open({
			      type:2
			      ,area:['50%', '60%']
			      ,title:"添加账户"
				  ,content: '添加账户.html'
				});
			});

			// 删除操作
		    $(document).on("click", ".a4", function() {
			    layer.open({
			      title:"删除操作"
				  ,content: '您确认要删除吗？'
				  ,btn: ['取消', '确认']
				  ,yes: function(index, layero){
				       layer.closeAll();
				  }
				  ,btn2: function(index, layero){
				      layer.msg('删除成功！',{time: 1000});
				  }
				});
			});

		   
			
		});
	</script>
</body>
</html>